package cn.lg.soar.system.monitor.model;

import cn.lg.soar.database.translate.TranslateByEntity;
import cn.lg.soar.system.auth.entity.User;
import com.baomidou.mybatisplus.annotation.TableField;
import eu.bitwalker.useragentutils.DeviceType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author luguoxiang 469599794@qq.com
 * @Date: 2024/2/3 22:47
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
public class WebLog {

    @ApiModelProperty("租户id")
    private Integer tenantId;

    @TranslateByEntity(value = User.class, label = "nickname")
    @ApiModelProperty("操作者（谁）")
    private Long userId;

    @ApiModelProperty("操作者ip（何地）")
    private String userIp;

    @ApiModelProperty("执行开始时间（何时）")
    private LocalDateTime datetime;

    @ApiModelProperty("操作（做了什么）")
    private String operate;

    @ApiModelProperty("哪个接口")
    private String path;

    @ApiModelProperty("终端类型")
    private DeviceType deviceType;

    @TableField("`system`")
    @ApiModelProperty("用户系统")
    private String system;

    @ApiModelProperty("用户浏览器")
    private String browser;

    @ApiModelProperty("来源")
    private String source;

    @ApiModelProperty("数据类型")
    private String stack;

}
